<template>
  <el-card class="table">
    <el-table :data="tableData" style="width: 100%">
      <el-table-column
        show-overflow-tooltip
        align="center"
        :prop="index"
        :label="item"
        v-for="(item, index) in tableLable"
        :key="index"
      >
      </el-table-column>
    </el-table>
  </el-card>
</template>

 <script>
import { request } from "../../../../../api/request/index";
export default {
  data() {
    return {
      tableData: [],
      tableLable: {},
    };
  },
  created() {
    request({
      method: "get",
      url: "posts",
    }).then((res) => {
      this.tableData = res.data[0].tableData;
      this.tableLable = res.data[1].tableLable;
    });
  },
};
</script>

<style lang="less" scoped>
.table {
  margin-top: 20px;
}
</style>